home *** CD-ROM | disk | FTP | other *** search
/ Merciful 5 / Merciful - Disc 5.iso / software / p / pcqpascalv1.2d.lha / Include / Devices / Narrator.i < prev    next >
Text File  |  1997-05-06  |  6KB  |  125 lines

  1. {
  2.         Narrator.i for PCQ Pascal
  3. }
  4.  
  5. {$I "Include:Exec/IO.i"}
  6.  
  7. Const
  8.                 {          Device Options      }
  9.  
  10.     NDB_NEWIORB   =  0;       { Use new extended IORB                }
  11.     NDB_WORDSYNC  =  1;       { Generate word sync messages          }
  12.     NDB_SYLSYNC   =  2;      { Generate syllable sync messages      }
  13.  
  14.  
  15.     NDF_NEWIORB   =  1;
  16.     NDF_WORDSYNC  =  2;
  17.     NDF_SYLSYNC   =  4;
  18.  
  19.  
  20.                 {           Error Codes         }
  21.  
  22.     ND_NoMem            = -2;   { Can't allocate memory         }
  23.     ND_NoAudLib         = -3;   { Can't open audio device               }
  24.     ND_MakeBad          = -4;   { Error in MakeLibrary call             }
  25.     ND_UnitErr          = -5;   { Unit other than 0                     }
  26.     ND_CantAlloc        = -6;   { Can't allocate audio channel(s)       }
  27.     ND_Unimpl           = -7;   { Unimplemented command         }
  28.     ND_NoWrite          = -8;   { Read for mouth without write first    }
  29.     ND_Expunged         = -9;   { Can't open, deferred expunge bit set }
  30.     ND_PhonErr          = -20;  { Phoneme code spelling error           }
  31.     ND_RateErr          = -21;  { Rate out of bounds                    }
  32.     ND_PitchErr         = -22;  { Pitch out of bounds                   }
  33.     ND_SexErr           = -23;  { Sex not valid                 }
  34.     ND_ModeErr          = -24;  { Mode not valid                        }
  35.     ND_FreqErr          = -25;  { Sampling frequency out of bounds      }
  36.     ND_VolErr           = -26;  { Volume out of bounds                  }
  37.     ND_DCentErr         = -27;      { Degree of centralization out of bounds }
  38.     ND_CentPhonErr      = -28;      { Invalid central phon                 }
  39.  
  40.  
  41.  
  42.                 { Input parameters and defaults }
  43.  
  44.     DEFPITCH            = 110;  { Default pitch                 }
  45.     DEFRATE             = 150;  { Default speaking rate (wpm)           }
  46.     DEFVOL              = 64;   { Default volume (full)         }
  47.     DEFFREQ             = 22200; { Default sampling frequency (Hz)      }
  48.     MALE                = 0;    { Male vocal tract                      }
  49.     FEMALE              = 1;    { Female vocal tract                    }
  50.     NATURALF0           = 0;    { Natural pitch contours                }
  51.     ROBOTICF0           = 1;    { Monotone                              }
  52.     DEFSEX              = MALE; { Default sex                           }
  53.     DEFMODE             = NATURALF0;    { Default mode                          }
  54.     DEFARTIC            = 100;         { 100% articulation (normal)           }
  55.     DEFCENTRAL          = 0;           { No centralization                    }
  56.     DEFF0PERT           = 0;           { No F0 Perturbation                   }
  57.     DEFF0ENTHUS         = 32;          { Default F0 enthusiasm (in 32nds)     }
  58.     DEFPRIORITY         = 100;         { Default speaking priority            }
  59.  
  60.  
  61.  
  62.                 {       Parameter bounds        }
  63.  
  64.     MINRATE             = 40;   { Minimum speaking rate         }
  65.     MAXRATE             = 400;  { Maximum speaking rate         }
  66.     MINPITCH            = 65;   { Minimum pitch                 }
  67.     MAXPITCH            = 320;  { Maximum pitch                 }
  68.     MINFREQ             = 5000; { Minimum sampling frequency            }
  69.     MAXFREQ             = 28000; { Maximum sampling frequency           }
  70.     MINVOL              = 0;    { Minimum volume                        }
  71.     MAXVOL              = 64;   { Maximum volume                        }
  72.     MINCENT             = 0;          { Minimum degree of centralization     }
  73.     MAXCENT             = 100;          { Maximum degree of centralization     }
  74.  
  75.  
  76.  
  77. Type
  78.  
  79.                 {    Standard Write request     }
  80.  
  81.     narrator_rb = record
  82.         message         : IOStdReq;     { Standard IORB         }
  83.         rate            : Short;        { Speaking rate (words/minute) }
  84.         pitch           : Short;        { Baseline pitch in Hertz       }
  85.         mode            : Short;        { Pitch mode                    }
  86.         sex             : Short;        { Sex of voice                  }
  87.         ch_masks        : Address;      { Pointer to audio alloc maps   }
  88.         nm_masks        : Short;        { Number of audio alloc maps    }
  89.         volume          : Short;        { Volume. 0 (off) thru 64       }
  90.         sampfreq        : Short;        { Audio sampling freq           }
  91.         mouths          : Boolean;      { If non-zero, generate mouths }
  92.         chanmask,                       { Which ch mask used (internal)}
  93.         numchan,                        { Num ch masks used (internal) }
  94.         flags,                          { New feature flags            }
  95.         F0enthusiasm,                   { F0 excursion factor          }
  96.         F0perturb,                      { Amount of F0 perturbation    }
  97.         F1adj,                          { F1 adjustment in ±5% steps   }
  98.         F2adj,                          { F2 adjustment in ±5% steps   }
  99.         F3adj,                          { F3 adjustment in ±5% steps   }
  100.         A1adj,                          { A1 adjustment in decibels    }
  101.         A2adj,                          { A2 adjustment in decibels    }
  102.         A3adj,                          { A3 adjustment in decibels    }
  103.         articulate,                     { Transition time multiplier   }
  104.         centralize      : Byte;         { Degree of vowel centralization }
  105.         centphon        : String;       { Pointer to central ASCII phon  }
  106.         AVbias,                         { AV bias                      }
  107.         AFbias,                         { AF bias                      }
  108.         priority,                       { Priority WHILE speaking      }
  109.         pad1            : Byte;         { For alignment                }
  110.     end;
  111.     narrator_rbPtr = ^narrator_rb;
  112.  
  113.  
  114.                 {    Standard Read request      }
  115.  
  116.     mouth_rb = record
  117.         voice   : narrator_rb;          { Speech IORB                   }
  118.         width   : Byte;                 { Width (returned value)        }
  119.         height  : Byte;                 { Height (returned value)       }
  120.         shape   : Byte;                 { Internal use, do not modify   }
  121.         sync    : Byte;                 { Returned sync events          }
  122.     end;
  123.     mouth_rbPtr = ^mouth_rb;
  124.  
  125.